(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39883],{77446:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[chapterId]/reflections",function(){return n(66700)}])},73756:function(e,t,n){"use strict";var r=n(57611),i=n(67597),a=n(62103),o=n(19175),s=n(10117),c=n(87739),u=function(e){var t=e.queryKey,n=e.render,i=e.renderError,u=e.initialData,f=e.loading,l=void 0===f?function(){return(0,r.jsx)(s.Z,{})}:f,_=e.fetcher,d=void 0===_?c._i:_,h=e.showSpinnerOnRevalidate,p=void 0===h||h,m=e.onFetchSuccess,v=(0,a.Z)(t,(function(){return d(t).then((function(e){return null===m||void 0===m||m(e),Promise.resolve(e)})).catch((function(e){return Promise.reject(e)}))}),{fallbackData:u}),g=v.data,w=v.error,b=v.isValidating,S=v.mutate;if(p?b:b&&!g)return l();if(w){if(i){var x=i(w);if("undefined"!==typeof x)return x}return(0,r.jsx)(o.Z,{onRetryClicked:function(){S()},error:w})}return n(g)};t.Z=(0,i.memo)(u)},19175:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r,i=n(57611),a=n(67597),o=n(61395),s=n(36284),c=n.n(s),u=n(85494);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=(0,w.Z)({client_auth_token:T.env.NEXT_PUBLIC_QURAN_REFLECT_TOKEN},t);return"".concat(N,"/").concat(e,"?").concat((0,x.Z)(n))},I=function(e){var t=e.surahId,n=e.ayahNumber,r=e.locale,i=e.page,a=void 0===i?1:i,o=e.tab,s=void 0===o?k.MostPopular:o,c=Number(t)+1;return V("posts.json",{"q[filters_attributes][0][chapter_id]":c,"q[filters_attributes][0][from]":n,"q[filters_attributes][0][to]":n,"q[filters_operation]":"OR",page:a,tab:s,lang:r,feed:!0})},C=function(e){return V("v1/posts/".concat(e,"/views"))},Z=function(){var e=(0,g.Z)((function(e){return(0,b.__generator)(this,(function(t){return[2,(0,S._i)(C(e),{method:"POST",headers:{"Content-Type":"application/json"}})]}))}));return function(t){return e.apply(this,arguments)}}(),y=(function(){var e=(0,g.Z)((function(e){return(0,b.__generator)(this,(function(t){return[2,(0,S._i)(e)]}))}))}(),s()((function(){return n.e(10842).then(n.bind(n,10842))}),{loadableGenerated:{webpack:function(){return[10842]}},ssr:!1})),E=s()((function(){return Promise.all([n.e(13147),n.e(37154)]).then(n.bind(n,37154))}),{loadableGenerated:{webpack:function(){return[37154]}},ssr:!1,loading:l.Z}),j=function(e){var t=e.render,n=e.initialChapterId,r=e.initialVerseNumber,o=e.scrollToTop,s=(0,a.useState)(n),_=s[0],d=s[1],h=(0,a.useState)(r),g=h[0],w=h[1],b=(0,c.Z)().lang,S=(0,a.useCallback)((function(e){var t=e.getAttribute("data-post-id");(0,m.jl)()?(0,v.GG)(t).catch((function(){})):Z(t).catch((function(){}))}),[]);p({threshold:1},S,f.yG,"postId","countAsViewedAfter");var x=(0,a.useCallback)((function(e){return(0,i.jsx)(E,{data:e,selectedChapterId:_,selectedVerseNumber:g,setSelectedVerseNumber:w,scrollToTop:o})}),[o,_,g]),k=(0,i.jsx)(u.Z,{loading:l.Z,queryKey:I({surahId:_,ayahNumber:g,locale:b}),render:x});return t({surahAndAyahSelection:(0,i.jsx)(y,{selectedChapterId:_,selectedVerseNumber:g,setSelectedChapterId:d,setSelectedVerseNumber:w}),body:k})}},11332:function(e,t,n){"use strict";var r=n(45361),i=n(57611),a=n(37014),o=n.n(a),s=n(57065),c=n.n(s),u=n(34756),f=n.n(u),l=n(90914);t.Z=function(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.Z,{className:(f().tafsirSkeletonItem,f().ayahSekletonItem)}),c()(1,15).map((function(e){var t;return(0,i.jsx)(l.Z,{className:o()(f().tafsirSkeletonItem,(t={},(0,r.Z)(t,f().tafsirSkeletonItem1,e%1===0),(0,r.Z)(t,f().tafsirSkeletonItem2,e%2===0),(0,r.Z)(t,f().tafsirSkeletonItem3,e%3===0),t))},e)}))]})}},35702:function(e,t,n){"use strict";n.d(t,{FW:function(){return a},NM:function(){return r},s$:function(){return o},yG:function(){return i}});var r="quranReaderObserver",i="reflectionsObserver",a=function(e){return{rootMargin:e?"-115.6px 0px -70% 0px":"-131.6px 0px -68% 0px",threshold:.1}},o=function(e){return{verseKey:e.getAttribute("data-verse-key"),chapterId:e.getAttribute("data-chapter-id"),page:e.getAttribute("data-page"),hizb:e.getAttribute("data-hizb")}}},66700:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return h}});var r=n(57611),i=(n(67597),n(61395)),a=n(99968),o=n(21648),s=n(54569),c=n(32275),u=n(50148),f=n(86719),l=n.n(f),_=n(43609),d=n(84020),h=!0;t.default=function(e){var t=e.hasError,n=e.chapter,f=e.verseNumber,h=e.chapterId,p=e.fallback,m=(0,i.Z)("quran-reader"),v=m.t,g=m.lang;if(t)return(0,r.jsx)(u.default,{statusCode:500});var w=(0,d.HT)("".concat(h,":").concat(f));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Z,{title:"".concat(n.chapter.transliteratedName," - ").concat((0,_.rQ)(Number(f),g)," ").concat(v("common:reflections")," "),image:(0,c.oJ)({chapterId:h,verseNumber:f,locale:g}),imageWidth:1200,imageHeight:630,canonical:(0,d.Z2)(g,w),languageAlternates:(0,_.qc)(w),description:v("reflections-desc",{ayahNumber:f,surahName:n.chapter.transliteratedName})}),(0,r.jsx)(a.J$,{value:{fallback:p},children:(0,r.jsx)("div",{className:l().pageContainer,children:(0,r.jsx)("div",{className:l().flow,children:(0,r.jsx)("div",{className:l().flowItem,children:(0,r.jsx)(s.Z,{scrollToTop:d.hb,initialChapterId:h,initialVerseNumber:f.toString(),render:function(e){var t=e.body,n=e.surahAndAyahSelection;return(0,r.jsxs)("div",{children:[n,t]})}})})})})})]})}},50148:function(e,t,n){"use strict";n.r(t);var r=n(45361),i=n(57611),a=n(37014),o=n.n(a),s=n(15129),c=n(61395),u=n(61085),f=n.n(u),l=n(85494),_=n(57830);t.default=function(e){e.statusCode;var t=e.hasFullWidth,n=void 0===t||t,a=(0,c.Z)("error").t,u=(0,s.useRouter)();return(0,i.jsxs)("div",{className:o()(f().container,(0,r.Z)({},f().withFullWidth,n)),children:[(0,i.jsx)("h1",{className:f().title,children:a("title")}),(0,i.jsx)("div",{className:f().goBack,children:(0,i.jsx)(l.ZP,{onClick:function(){document&&document.referrer?u.back():u.push("/")},children:a("go-back")})}),(0,i.jsxs)("p",{className:f().reportBug,children:[a("if-persist")," ",(0,i.jsx)(_.Z,{href:"https://feedback.quran.com/",variant:_.r.Highlight,children:a("report-cta")})]})]})}},76854:function(e,t,n){"use strict";n.d(t,{Fp:function(){return f},GG:function(){return s},P_:function(){return c},ST:function(){return u}});var r=n(1997),i=n(51726),a=n(75879),o=n(9740),s=function(){var e=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,o.j0)((0,a.PI)(e),{})]}))}));return function(t){return e.apply(this,arguments)}}(),c=function(){var e=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,o.j0)((0,a.bE)(e),{})]}))}));return function(t){return e.apply(this,arguments)}}(),u=function(){var e=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,o.UK)((0,a.BC)(e))]}))}));return function(t){return e.apply(this,arguments)}}(),f=(function(){var e=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,o.UK)((0,a.YV)(e))]}))}))}(),function(){var e=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,o.UK)((0,a.Sv)(e))]}))}));return function(t){return e.apply(this,arguments)}}())},75879:function(e,t,n){"use strict";n.d(t,{BC:function(){return s},PI:function(){return a},Sv:function(){return u},YV:function(){return c},bE:function(){return o}});var r=n(37572),i=function(e){return"qf/".concat(e)},a=function(e){return(0,r.bf)(i("posts/".concat(e,"/views")))},o=function(e){return(0,r.bf)(i("users/".concat(e,"/follow")))},s=function(e){return(0,r.bf)(i("users/".concat(e,"/is-followed")))},c=function(e){return(0,r.bf)(i("posts"),e)},u=function(e){return(0,r.bf)(i("quranic-calendar/".concat(e)))}},48842:function(e,t,n){"use strict";n.d(t,{Nl:function(){return a},aS:function(){return r},ox:function(){return i}});var r=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",r=e.split("",t),i="",a=0;a]+)>)/gi,"")},a=function(e){if(!e)return"";var t=e.split("-");return 1===t.length?t[0]:t[t.length-1]}},36284:function(e){e.exports={container:"Error_container__1m9XV",text:"Error_text__yg4kD"}},34756:function(e){e.exports={container:"TafsirView_container__R9G7I",tafsirName:"TafsirView_tafsirName__QPOiO",tafsirContainer:"TafsirView_tafsirContainer__g2rhW",rtl:"TafsirView_rtl__8pRLP",surahAndAyahSelectionContainer:"TafsirView_surahAndAyahSelectionContainer__W96nf",tafsirSelectionContainer:"TafsirView_tafsirSelectionContainer__QSkE3",tafsirSelectionItem:"TafsirView_tafsirSelectionItem__GTJvw",tafsirItemSelected:"TafsirView_tafsirItemSelected__SXceL",separatorContainer:"TafsirView_separatorContainer__diS8n",verseTextContainer:"TafsirView_verseTextContainer__A7tZ_",selectionItem:"TafsirView_selectionItem__FJdhi",ayahSelection:"TafsirView_ayahSelection__jWULb",tafsirSkeletonItem:"TafsirView_tafsirSkeletonItem__q5sNk",ayahSekletonItem:"TafsirView_ayahSekletonItem__B_nJN",tafsirSkeletonItem1:"TafsirView_tafsirSkeletonItem1__nLGRk",tafsirSkeletonItem2:"TafsirView_tafsirSkeletonItem2__aaEJy",tafsirSkeletonItem3:"TafsirView_tafsirSkeletonItem3__NqYKV",tafsirSelectionSkeleton:"TafsirView_tafsirSelectionSkeleton__3oq7k",languageSelection:"TafsirView_languageSelection__8EFqZ","tafsir-font-size-1":"TafsirView_tafsir-font-size-1__sLRnq","tafsir-font-size-2":"TafsirView_tafsir-font-size-2__JLiR2","tafsir-font-size-3":"TafsirView_tafsir-font-size-3__K0LBa","tafsir-font-size-4":"TafsirView_tafsir-font-size-4__KrD1k","tafsir-font-size-5":"TafsirView_tafsir-font-size-5__ri_Mr","tafsir-font-size-6":"TafsirView_tafsir-font-size-6__FvBko","tafsir-font-size-7":"TafsirView_tafsir-font-size-7__oS0XU","tafsir-font-size-8":"TafsirView_tafsir-font-size-8__1U_43","tafsir-font-size-9":"TafsirView_tafsir-font-size-9__6VJC2","tafsir-font-size-10":"TafsirView_tafsir-font-size-10__zRYWI"}},61085:function(e){e.exports={container:"_error_container__vJFnH",withFullWidth:"_error_withFullWidth__VEzYc",title:"_error_title__oLWAK",goBack:"_error_goBack__U4WNd",reportBug:"_error_reportBug__tsKmR"}},86719:function(e){e.exports={pageContainer:"index_pageContainer__Pxtn3",loadingContainer:"index_loadingContainer__WEZFc",flow:"index_flow__rCTR5",flowItem:"index_flowItem__GnXWz",additionalVerticalGap:"index_additionalVerticalGap__nzYz6",fullWidth:"index_fullWidth__1n4ux"}}},function(e){e.O(0,[49774,92888,40179],(function(){return t=77446,e(e.s=t);var t}));var t=e.O();_N_E=t}]); //# sourceMappingURL=reflections-e778d176d7977fb4.js.map